<?php
//和ajax_login.html配套，接收ajax传递的参数
$user = $_POST["user"];
$pwd = $_POST["pwd"];
$pdo = new PDO("mysql:host=127.0.0.1;dbname=news","root","keyan");
$pdo->exec("set names utf8");
$sql = "select * from manager where username =? and password =?";
$pdos = $pdo->prepare($sql);
$pdos->execute(array($user,$pwd));
$row= $pdos->fetch();
if($row){
	echo 1;
}else{
	echo 0;
}